package com.ruicar.afs.cloud.admin.dto.holiday;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;


@Data
public class Month {
    public Month() {
        weeks = new ArrayList<>();
        weeks.add(new Week());
    }

    private int month;
    private List<Week> weeks;
    @JsonIgnore
    @JSONField(serialize = false)
    public Week getLastWeek(){
       return weeks.get(weeks.size()-1);
    }
}
